﻿<?php
include("../Modules/admin_resist_mdl.php");
// include('doctype.htm');
?>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="javascript" type="text/javascript"> 
	

</script>

</head>

<body>
<script language="javascript">
	
	// Kiem tra cac truong trong form co bi bo trong hay khong
	function emptyCheck()
	{
		if ( (document.frmAddSV.txtMSSV.value == "")  ||
			 (document.frmAddSV.txtHoTen.value == "") ||
			 (document.frmAddSV.txtMK1.value == "")	||
			 (document.frmAddSV.txtMK2.value == "")		)
		
				document.frmAddSV.smtSV.disabled = true;
		
		else document.frmAddSV.smtSV.disabled = false;
	}
	
	// Kiem tra mat khau co khop nhau khong
	function passCheck()
	{
		if (document.frmAddSV.txtMK1.value != document.frmAddSV.txtMK2.value)
		{
			alert("Mật khẩu không khớp");
			return false;
		}
		return true;
	}
</script>

<h4>Thêm sinh viên</h4>

<form method="POST" action="../Modules/admin_addsv.php" name="frmAddSV" onsubmit="return passCheck();" onreset="this.smtSV.disabled = true">
	<ul>
		<li>
			<span>MSSV</span>
			<input type="text" name="txtMSSV" onkeyup="emptyCheck();">
		</li>
		
		<li>
			<span>Họ và tên</span>
			<input type="text" name="txtHoTen" onkeyup="emptyCheck();">
		</li>
		
		<li>
			<span>Mật khẩu</span>
			<input type="password" name="txtMK1" onkeyup="emptyCheck();">
		</li>
		
		<li>
			<span>Nhập lại mật khẩu</span>
			<input type="password" name="txtMK2" onkeyup="emptyCheck();">
		</li>
		
		<li>
			<input type="submit" value="Thêm" name="smtSV" disabled="true">
			<input type="reset" value="Nhập lại" name="resSV">
		</li>
	</ul>
</form>

</body>

</html>